package edu.kjxy.demo0315;

public class demo07 {

	public static void main(String[] args) {
		int cnt = 0;
		for(int n = 2; n <= 1000; n++) {
			int i = 0;
			for(i = 2; i < n; i++) {
				if(n % i == 0) {
					break;
				}
			}
			if(i == n) {
				System.out.print("%-4d".formatted(n));
				cnt++;
				if(cnt % 20 == 0) {
					System.out.println();
				}
			}
		}
	}

}
